# uncompyle6 version 3.2.3
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: helpers\rate_limiter\__init__.py
__author__ = "sanyi"
import time
from helpers.rate_limiter.leacky_bucket_collection import LeakyBucketCollection


class RateLimiter(LeakyBucketCollection):
    def __init__(
        self, event_rate, burst, max_tracked_events=100, time_function=time.time
    ):
        super().__init__(event_rate, burst, max_tracked_events, time_function)

    def add(self, key, cost=1):
        return super().add(key, cost)
